package com.itheima.homework;

class TestStudent1 {
    public static void main(String[] args) {
        //无参构造创建对象,通过setXxx方法给成员变量赋值
        Student stu1 = new Student();
        stu1.setAge(18);
        stu1.setName("刘亦菲");
        stu1.show();
        //有参构造,直接给对象赋值
        Student stu2 = new Student("贾静雯",18);
        stu2.show();
    }
}
